package com.seqb.manage.user.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.seqb.annotation.Ignored;
import com.seqb.common.dto.CommDTO;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lilinshen
 * @title 用户账号表
 * @description 请填写相关描述
 * @date 2019/11/15
 */
@Data
@TableName("t_user")
public class UserDO extends CommDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    //唯一编号
    private Long id;
    //用户名
    private String username;
    //账号
    private String account;
    //密码
    private String password;
    //状态(0-禁用，1-正常)
    private String state;
    //邮箱
    private String mailbox;
    //性别(1-男，2-女)
    private String gender;
    //生日
    @Ignored
    private Date birthday;
    //现居住地
    private String address;
    //省份
    private String province;
    //所在城市
    private String city;
    //所在地区
    private String district;
    //关联微信账号ID
    private Long wechatId;
    //创建者编号
    @TableField(fill = FieldFill.INSERT)
    private Long createNumber;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createDate;
    //修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE, update = "now()")
    private Date updateDate;
    //是否删除(0-否，1-是)
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private String isDelete;
    //版本号
    @TableField(fill = FieldFill.INSERT_UPDATE, update = "%s+1")
    private Long version;
}
